<div class="wrap cfix">
<div class="main-cont innerWrap">
  <div id="content">
    <div class="main-straps">
      <div class="four-col"> </div>
      <section id="homePageVideoStrap" class="strap multimedia">
        <header class="cf ">
          <h2>Nổi bật</h2>
          <ul class="nav">
            <li><a href="<?php echo base_url(); ?>cau-hoi-moi-nhat.html">Câu hỏi mới nhất</a></li>
            <li><a href="<?php echo base_url(); ?>cau-hoi-nhieu-tra-loi-nhat.html">Nhiều trả lời nhất</a></li>
            <li><a href="<?php echo base_url(); ?>cau-hoi-hay-nhat.html">Câu hỏi hay nhất</a></li>
            <?php
				if(!isset($this->session->userdata['userid'])){
			?>
            <li><a class="users_info" href="<?php echo base_url(); ?>dang-ky.html">Đăng ký</a></li>
            <li><a class="users_info" href="<?php echo base_url(); ?>dang-nhap.html">Đăng nhập</a></li>
            <?php
				}else{
			?>
            <li><a class="users_info" href="<?php echo base_url(); ?>quan-ly-tai-khoan.html">Xin chào : <?php echo $this->session->userdata['username']?></a></li>
            <li class="bachnx_show_info">
            	
            	<a class="users_info" href="<?php echo base_url(); ?>quan-ly-tai-khoan.html">Tài khoản</a>
                <ul class="bachnx_userinfo" style="display:none;">
                	<li><a href="<?php echo base_url(); ?>quan-ly-tai-khoan.html">Sửa thông tin</a></li>
                	<li><a href="#">Câu hỏi của bạn</a></li>
                    <li><a href="#">Câc câu trả lời</a></li>
                    <li><a href="#">Đổi mật khẩu</a></li>
                    <li><a href="<?php echo base_url(); ?>thoat.html">Thoát</a></li>
                </ul>
            </li>
            <li><a onclick="return confirm('Bạn có muốn thoát không?');" class="users_info" href="<?php echo base_url(); ?>thoat.html">Thoát</a></li>
            <?php }?>
          </ul>
        </header>
        <div class="col-minus-two">
          <?php $this->load->library("string"); ?>
          <?php if(isset($newquest)){foreach($newquest as $question){ ?>
          <article class="article puff"><a class="play-video" href="#" title=""><img src="<?php if($question['image'] != NULL){ echo base_url()."uploads/users/thumb/".$question['image']; }else{ echo base_url(); ?>public/images/no-avatar.png <?php } ?>" width="50" height="50" alt="<?php echo $question['username']; ?>" title="<?php echo $question['username']; ?>" /></a>
            <div class="wof">
              <h3><a href="<?php echo base_url().$question['rewrite']."-".$question['id']; ?>.html" title="<?php echo $question['title']; ?>"><?php echo $this->string->cutstr($question['title'],0,60); ?></a> </h3>
            </div>
          </article>
          <?php } } ?>
        </div>
        <div class="video-player clippingArea">
          <div id="video-player-strap-player"><img src="<?php echo base_url();?>public/images/adsense-300x250.gif" alt="" /> </div>
        </div>
        <?php $this->load->view("layouts/question"); ?>
      </section>
      <div class="col last">
        <div id="adspot-300x250-pos-2" class="ad" style='display:none;'> <small><span>Advertisement</span></small> </div>
      </div>
      <?php if(isset($listone)){ ?>
      <section class="strap dailylife">
        <header class="cf">
          <h2><a href="<?php echo base_url().$listone['rewrite']; ?>.html"><?php echo $listone['names']; ?><span class="icon external"><?php echo $listone['names']; ?></span> </a> </h2>
          <ul class="nav">
          	<?php if(isset($categone)){ $j=1; foreach($categone as $categori){ ?>
            <li <?php if($j == count($categone)){ echo "class='last'";} ?>><a href="<?php echo $listone['rewrite']."/".$categori['rewrite']; ?>.html" title="<?php echo $categori['name']; ?>"><?php echo $categori['name']; ?></a></li>
            <?php $j++; } } ?>
          </ul>
        </header>
        <?php $this->load->library("string"); ?>
        <div class="col">
          <?php if(isset($questone)){ ?>
          <?php $i = 1; foreach($questone as $items){ ?>
          <article class="article">
            <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title="<?php echo $items['title']; ?>"><?php echo $this->string->cutstr($items['title'],0,37); ?></a></h3>
            <a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="40" height="40" alt="" /></a>
            <div class="wof"><span class="author"><?php echo $items['username']; ?></span>
              <p><?php echo $this->string->cutstr($items['title'],0,140); ?></p>
            </div>
          </article>
          <?php if($i == 3){ break; } ?>
          <?php $i++; } } ?>
        </div>
        <div class="col">
          <article class="article feature"> <a href="<?php echo base_url().$listone['rewrite']; ?>.html" title="<?php echo $listone['names']; ?>"><img src="<?php echo base_url()."uploads/cate/thumb/".$listone['images']; ?>" width="300" height="220" alt="<?php echo $listone['names']; ?>" title="<?php echo $listone['names']; ?>" /></a>
            <div class="wof">
              <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title="<?php echo $listone['names']; ?>"><?php echo $listone['names']; ?></a></h3>
              <p><?php echo $listone['info']; ?></p>
            </div>
          </article>
        </div>
        <div class="col in-brief last">
          <?php if(isset($questone)){ ?>
          <?php $i = 1; foreach($questone as $items){ ?>
          <?php if($i > 2){ ?>
          <article class="article" > <a href="#" title=""><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="60" height="60" alt="" /></a> <span class="kicker"><?php echo $items['username']; ?></span>
            <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><?php echo $items['title']; ?></a></h3>
          </article>
          <?php } $i++; } } ?>
        </div>
      </section>
      <?php } ?>
      <?php if(isset($listtwo)){ ?>
      <section class="strap itpro">
      <header class="cf ">
        <h2><a href="<?php echo base_url().$listtwo['rewrite']; ?>.html"><?php echo $listtwo['names']; ?><span class="icon external"><?php echo $listtwo['names']; ?></span></a></h2>
      </header>
      <?php if(isset($questtwo)){ ?>
      <?php $i=1; foreach($questtwo as $items){ ?>
      <div class="col <?php if($i == 3){ echo "last";} ?>">
        <article class="article" >
        <h3 style="height:40px"><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><?php echo $items['title']; ?></a></h3>
        <a class="more-photos " href="#" title="<?php echo $items['username']; ?>"><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="80" height="66" alt="" /></a>
        <div class="wof">
          <p><?php echo $items['title']; ?></p>
          </article>
        </div>
        <?php $i++; } } ?>
        </section>
        <?php } ?>
        <?php if(isset($listthree)){ ?>
        <section class="strap entertainment">
          <header class="cf">
            <h2><a href="<?php echo base_url().$listthree['rewrite']; ?>.html"><?php echo $listthree['names']; ?><span class="icon external"><?php echo $listthree['names']; ?></span></a></h2>
            <ul class="nav">
          	<?php if(isset($categthree)){ $j=1; foreach($categthree as $categori){ ?>
            <li <?php if($j == count($categthree)){ echo "class='last'";} ?>><a href="<?php echo $listthree['rewrite']."/".$categori['rewrite']; ?>.html" title="<?php echo $categori['name']; ?>"><?php echo $categori['name']; ?></a></li>
            <?php $j++; } } ?>
            </ul>
          </header>
          <div class="col">
          <?php if(isset($questthree)){ ?>
          <?php $i = 1; foreach($questthree as $items){ ?>
          <article class="article">
            <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title="<?php echo $items['title']; ?>"><?php echo $this->string->cutstr($items['title'],0,40); ?></a></h3>
            <a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="86" height="66" alt="" /></a>
            <div class="wof"><span class="author"><?php echo $items['username']; ?></span>
              <p><?php echo $this->string->cutstr($items['title'],0,200); ?></p>
            </div>
          </article>
          <?php if($i == 2){ break; } ?>
          <?php $i++; } } ?>
        </div>
          <div class="col">
            <article class="article feature clippingArea clippingAction"> 
              <a href="<?php echo base_url().$listthree['rewrite']; ?>.html" class="more-photos" title="<?php echo $listthree['names']; ?>"><img src="<?php echo base_url()."uploads/cate/thumb/".$listthree['images']; ?>" width="300" height="200" alt="<?php echo $listthree['names']; ?>" title="<?php echo $listthree['names']; ?>" /></a>
              <div class="wof">
                <h3><a href="<?php echo base_url().$listthree['rewrite']; ?>.html" title="<?php echo $listthree['names']; ?>"><?php echo $listthree['names']; ?></a></h3>
                <p><?php echo $listthree['info']; ?></p>
              </div>
            </article>
            <!-- class:article --> 
          </div>
          <div class="col in-brief last">
            <?php if(isset($questthree)){ ?>
            <?php $i = 1; foreach($questthree as $items){ ?>
            <?php if($i > 2){ ?>
            <article class="article clippingArea clippingAction"> 
              <a href="" title="#"><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="100" height="66" alt="" /></a><span class="kicker"><?php echo $items['username']; ?></span>
              <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><?php echo $items['title']; ?></a></h3>
            </article>
            <?php } $i++; } } ?>
          </div>
        </section>
        <?php } ?>
        <?php if(isset($listfour)){ ?>
        <section class="strap travel">
          <header class="cf">
            <h2><a href="<?php echo base_url().$listfour['rewrite']; ?>.html"><?php echo $listfour['names']; ?><span class="icon external"><?php echo $listfour['names']; ?></span></a></h2>
            <ul class="nav">
          	<?php if(isset($categfour)){ $j=1; foreach($categfour as $categori){ ?>
            <li <?php if($j == count($categfour)){ echo "class='last'";} ?>><a href="<?php echo $listfour['rewrite']."/".$categori['rewrite']; ?>.html" title="<?php echo $categori['name']; ?>"><?php echo $categori['name']; ?></a></li>
            <?php $j++; } } ?>
            </ul>
          </header>
          <div class="col">
            <?php if(isset($questfour)){ ?>
            <?php $i = 1; foreach($questfour as $items){ ?>
            <article class="article clippingArea clippingAction"> 
              <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title="<?php echo $items['title']; ?>"><?php echo $this->string->cutstr($items['title'],0,35); ?></a></h3>
              <a href="#" title=""><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="86" height="66" alt="" /></a>
              <div class="wof"> <span class="author"> <a href="#" title="Ben Grubb"><?php echo $items['username']; ?></a> </span>
                <p><?php echo $this->string->cutstr($items['title'],0,200); ?></p>
                <div class="article-meta"> <em class="access">Contains:</em> <a href="#"><span title="comments" class="icon comments">total comments</span>61</a></div>
              </div>
            </article>
            <?php if($i == 2){ break; } ?>
            <?php $i++; } } ?>
          </div>
          <div class="col">
            <article class="article feature clippingArea clippingAction"> 
              <a href="<?php echo base_url().$listfour['rewrite']; ?>.html" title="<?php echo $listfour['names']; ?>"><img src="<?php echo base_url()."uploads/cate/thumb/".$listfour['images']; ?>" width="300" height="200" alt="<?php echo $listfour['names']; ?>" title="<?php echo $listfour['names']; ?>" /></a>
              <div class="wof">
                <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title="<?php echo $listone['names']; ?>"><?php echo $listone['names']; ?></a></h3>
                <p><?php echo $listone['info']; ?></p>
              </div>
            </article>
          </div>
          <div class="col last">
            <ul class="link-list">
              <?php if(isset($questfour)){ ?>
              <?php $i = 1; foreach($questfour as $items){ ?>
              <?php if($i > 3){ ?>
              <li class="clippingArea clippingAction"><span class="kicker"><?php echo $items['username']; ?></span> 
              <a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><?php echo $items['title']; ?></a>
                <div class="article-meta"> <em class="access">Contains:</em> <a href="#"><span title="comments" class="icon comments">total comments</span>7</a> </div>
              </li>
              <?php } $i++; } } ?>
            </ul>
          </div>
        </section>
        <?php } ?>
        <?php if(isset($listfive)){ ?>
        <section class="strap itpro">
          <header class="cf">
            <h2><a href="<?php echo base_url().$listfive['rewrite']; ?>.html"><?php echo $listfive['names']; ?><span class="icon external"><?php echo $listfive['names']; ?></span></a></h2>
            <ul class="nav">
          	<?php if(isset($categfive)){ $j=1; foreach($categfive as $categori){ ?>
            <li <?php if($j == count($categfive)){ echo "class='last'";} ?>><a href="<?php echo $listfive['rewrite']."/".$categori['rewrite']; ?>.html" title="<?php echo $categori['name']; ?>"><?php echo $categori['name']; ?></a></li>
            <?php $j++; } } ?>
            </ul>
          </header>
          <?php if(isset($questfive)){ ?>
	      <?php $i=1; foreach($questfive as $items){ ?>
	      <div class="col <?php if($i == 3){ echo "last";} ?>">
	        <article class="article" >
	        <h3 style="height:40px"><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><?php echo $items['title']; ?></a></h3>
	        <a class="more-photos " href="#" title="<?php echo $items['username']; ?>"><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="86" height="66" alt="" /></a>
	        <div class="wof">
	          <p><?php echo $items['title']; ?></p>
	          </article>
	        </div>
	        <?php $i++; } } ?>
        </section>
         <?php } ?>
         <?php if(isset($listsix)){ ?>
        <section class="strap domain">
          <header class="cf ">
            <h2><a href="<?php echo base_url().$listsix['rewrite']; ?>.html"><?php echo $listsix['names']; ?><span class="icon external"><?php echo $listsix['names']; ?></span></a></h2>
            <p class="source">with <a href="#" class="domain">Hoiaz.net</a></p>
            <ul class="nav">
          	<?php if(isset($categsix)){ $j=1; foreach($categsix as $categori){ ?>
            <li <?php if($j == count($categsix)){ echo "class='last'";} ?>><a href="<?php echo $listsix['rewrite']."/".$categori['rewrite']; ?>.html" title="<?php echo $categori['name']; ?>"><?php echo $categori['name']; ?></a></li>
            <?php $j++; } } ?>
            </ul>
          </header>
          <div class="col">
          <?php if(isset($questsix)){ ?>
          <?php $i = 1; foreach($questsix as $items){ ?>
          <article class="article">
            <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title="<?php echo $items['title']; ?>"><?php echo $this->string->cutstr($items['title'],0,30); ?></a></h3>
            <a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="86" height="66" alt="" /></a>
            <div class="wof"><span class="author"><?php echo $items['username']; ?></span>
              <p><?php echo $this->string->cutstr($items['title'],0,200); ?></p>
            </div>
          </article>
          <?php if($i == 2){ break; } ?>
          <?php $i++; } } ?>
        </div>
          <div class="col">
            <article class="article feature clippingArea clippingAction"> 
              <a href="<?php echo base_url().$listsix['rewrite']; ?>.html" class="more-photos" title="<?php echo $listsix['names']; ?>"><img src="<?php echo base_url()."uploads/cate/thumb/".$listsix['images']; ?>" width="300" height="200" alt="<?php echo $listsix['names']; ?>" title="<?php echo $listsix['names']; ?>" /></a>
              <div class="wof">
                <h3><a href="<?php echo base_url().$listsix['rewrite']; ?>.html" title="<?php echo $listsix['names']; ?>"><?php echo $listsix['names']; ?></a></h3>
                <p><?php echo $listsix['info']; ?></p>
              </div>
            </article>
          </div>
          <div class="col last">
            <ul class="link-list">
            <?php if(isset($questsix)){ ?>
		    <?php $i = 1; foreach($questsix as $items){ ?>
            <?php if($i > 3){ ?>
              <li class="clippingArea clippingAction"> <span class="kicker"><?php echo $items['username']; ?></span> <a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><?php echo $items['title']; ?></a></li>
            <?php } $i++; } } ?>
            </ul>
          </div>
        </section>
        <?php } ?>
        <?php if(isset($listseven)){ ?>
        <section class="strap drive">
          <header class="cf">
            <h2><a href="<?php echo base_url().$listseven['rewrite']; ?>.html"><?php echo $listseven['names']; ?><span class="icon external"><?php echo $listseven['names']; ?></span></a></h2>
            <p class="source">with <a href="#" class="drive">Drive.com.au</a></p>
            <ul class="nav">
          	<?php if(isset($categseven)){ $j=1; foreach($categseven as $categori){ ?>
            <li <?php if($j == count($categseven)){ echo "class='last'";} ?>><a href="<?php echo $listseven['rewrite']."/".$categori['rewrite']; ?>.html" title="<?php echo $categori['name']; ?>"><?php echo $categori['name']; ?></a></li>
            <?php $j++; } } ?>
            </ul>
          </header>
          <div class="col">
            <?php if(isset($questseven)){ ?>
            <?php foreach($questseven as $items){ ?>
            <article class="article clippingArea clippingAction"> 
              <h3><a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><?php echo $items['title']; ?></a></h3>
              <a href="#" title="<?php echo $items['username']; ?>"><img src="<?php echo base_url(); ?>uploads/users/thumb/<?php echo $items['image']; ?>" width="86" height="66" alt="" /></a>
              <div class="wof"> <span class="author"> <a href="#" title="David McCowen"><?php echo $items['username']; ?></a> </span>
                <p><?php echo $this->string->cutstr($items['title'],0,200); ?></p>
                <div class="article-meta"> <em class="access">Contains:</em> <a href="#"><span title="comments" class="icon comments">total comments</span>11</a> </div>
              </div>
            </article>
            <?php break; ?>
            <?php } } ?>
            <ul class="link-list">
            <?php if(isset($questseven)){ ?>
            <?php foreach($questseven as $items){ ?>
              <li class="clippingArea clippingAction"> <a href="<?php echo base_url().$items['rewrite']."-".$items['id']; ?>.html" title=""><?php echo $items['title']; ?></a>
                <div class="article-meta"> <em class="access">Contains:</em> <a href=""><span title="comments" class="icon comments">total comments</span>19</a> </div>
                
              </li>
            <?php } } ?>
            </ul>
          </div>
          <div class="col">
            <article class="article feature clippingArea clippingAction"> 
              <a href="<?php echo base_url().$listseven['rewrite']; ?>.html" class="more-photos" title="<?php echo $listseven['names']; ?>"><img src="<?php echo base_url()."uploads/cate/thumb/".$listseven['images']; ?>" width="300" height="200" alt="<?php echo $listseven['names']; ?>" title="<?php echo $listseven['names']; ?>" /></a>
              <div class="wof">
                <h3><a href="<?php echo base_url().$listseven['rewrite']; ?>.html" title="<?php echo $listseven['names']; ?>"><?php echo $listseven['names']; ?></a></h3>
                <p><?php echo $listseven['info']; ?></p>
              </div>
            </article>
          </div>
          <section class="strap-subsection col in-brief drive last">
            <header class="cf strapHeadingDriveTV">
              <h2><a class="main" href="#"> Drive TV</a></h2>
              <p class="sponsor">Sponsored By<a class="last" href="#" target="_blank"><img src="http://images.smh.com.au/2011/06/01/2399418/hyundai_93x20.gif?" alt="Hyundai" height="20" width="90"></a></p>
              <ul class="nav">
              </ul>
            </header>
            <div class="col ">
              <article class="article video clippingArea clippingAction"> 
                <a class="play-video" href="#" title="Inside Line: are we a nation of dirty drivers?"><img src="http://images.smh.com.au/2014/05/28/5463239/th-REG-inside-Thumbnail-90x60.jpg" width="90" height="60" alt="Inside Line: are we a nation of dirty drivers? (Thumbnail)" />
                <dl class="duration">
                  <dt class="icon play">Duration</dt>
                  <dd>05:53</dd>
                </dl>
                </a>
                <h3><a href="http://media.smh.com.au/cars/car-news/inside-line-are-we-a-nation-of-dirty-drivers-5463237.html" title="Inside Line: are we a nation of dirty drivers?">Inside Line: are we a nation of dirty drivers?</a></h3>
              </article>
              <!-- class:article --> 
            </div>
            <div class="col ">
              <article class="article video clippingArea clippingAction" data-assetId="d-392c0" data-assetType="VIDEO" data-assetUrl="http://media.smh.com.au/cars/car-reviews/peugeot-rcz-r-road-and-track-review-5461776.html"> 
                <a class="play-video" href="#" title="Peugeot RCZ R road and track review"><img src="http://images.smh.com.au/2014/05/27/5461778/th-REG-rcz-Thumbnail-90x60.jpg" width="90" height="60" alt="Peugeot RCZ R road and track review (Thumbnail)" />
                <dl class="duration">
                  <dt class="icon play">Duration</dt>
                  <dd>03:44</dd>
                </dl>
                </a>
                <h3><a href="#" title="Peugeot RCZ R road and track review">Peugeot RCZ R road and track review</a></h3>
              </article>
              <!-- class:article --> 
            </div>
            <div class="col last">
              <article class="article video clippingArea clippingAction"> 
                <a class="play-video" href="#" title="Audi S3 Sedan video review"><img src="http://images.smh.com.au/2014/05/23/5449097/th-REG-s3-Thumbnail-90x60.jpg" width="90" height="60" alt="Audi S3 Sedan video review (Thumbnail)" />
                <dl class="duration">
                  <dt class="icon play">Duration</dt>
                  <dd>04:04</dd>
                </dl>
                </a>
                <h3><a href="#" title="Audi S3 Sedan video review">Audi S3 Sedan video review</a></h3>
              </article>
              <!-- class:article --> 
            </div>
          </section>
        </section>
        <?php } ?>
      </div>
    </div>
  </div>
  <section class="strap" style="padding:10px 0px">
    <div id="adspot-728x90-pos-1" class="ad" style='display:none;'></div>
  </section>
</div>